<template>
  <el-dialog
    title="对账单"
    :visible.sync="dialogVisible"
    width="600px"
    append-to-body
  >
    <el-form size="mini" ref="form" :model="form" label-width="80px">
      <el-form-item label="商品名称">
        {{ form.goods_title }}
      </el-form-item>
      <el-row>
        <el-col :span="13">
          <el-form-item label="订单号">
            {{ form.trade_no }}
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="下单时间"> {{ form.create_time }} </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="13">
          <el-form-item label="客户名字">
            {{ form.cert_name }}
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="联系方式"> {{ form.mobile }} </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="13">
          <el-form-item label="型号">
            {{ form.setmeal_title }}
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="成色">
            {{ form.phone_fineness }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="13">
          <el-form-item label="拿货价">
            {{ form.device_true_price }}
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="分期">
            {{ form.month_total }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="13">
          <el-form-item label="引流费用">
            {{ form.drainage_fee }}
          </el-form-item>
        </el-col>
        <el-col :span="11">
          <el-form-item label="店铺名称">
            {{ form.shopname }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="快递信息">
        {{
          form.logistic.delivery_type == 2
            ? "上门自取"
            : form.logistic.delivery_type == 3
            ? "上门安装"
            : form.logistic.logistics_no
            ? `${form.logistic.logistics_no}(${form.logistic.logistics_name})`
            : "无"
        }}
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="dialogVisible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible: false,
      form: {},
      // total: 0
    };
  },
  methods: {
    open(row) {
      this.dialogVisible = true;
      this.form = { ...row };
    },
  },
};
</script>

<style>
.download {
  color: rgb(39, 95, 237);
}
</style>
